package com.banmao.c03_baseUsage;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.support.FileSystemXmlApplicationContext;

// 注册 Bean，但从根目录找
@Slf4j
public class Demo02 {

    public static void main(String[] args) {
        /*
           FileSystemXmlApplicationContext：加载项目根目录下的 XML
         */
        FileSystemXmlApplicationContext ctx = new FileSystemXmlApplicationContext("demo01_IoC/beanXml/beans.xml");
        Object bean = ctx.getBean("com.banmao.c03_baseUsage.entity.User");
        log.info("User: {}", bean);
    }

}
